package com.learn.springcloud.feigncodingconfigurationconsumer.service;

import com.learn.springcloud.feigncodingconfigurationconsumer.bean.User;
import com.learn.springcoud.feigncodingconfig.FeignConfigure;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.netflix.feign.FeignClient;

/**
 * @Time : 2018/8/8 19:49
 * @Version : 1.0
 */
@FeignClient(name = "feign-coding-configuration-provider", configuration = FeignConfigure.class)
public interface FeignTestClient {

    @RequestLine("GET /feign/coding/config/provider/say/hello?name={name}")
    String sayHello1(@Param("name") String name);

    @RequestLine("POST /feign/coding/config/provider/say/hello2")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    User sayHello2(User user);
}
